var express = require('express');
const { pageConf } = require('../config/config');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { 
    indexPage: pageConf.indexPage,
    cards: [
      {
        title: '爱尚手机商城项目',
        imgUrl: '/img/5.jpg',
        description: 'PC端：koa2 + sass + 服务端渲染 + node-fetch + 数据缓存',
        projectUrl: 'http://aishangmobile.wujinhui.xyz/'
      },
      {
        title: '乐畅旅游景点推荐',
        imgUrl: '/img/1.jpg',
        description: '移动端：vue2 + vuecli + stylus + vuex',
        projectUrl: 'http://www.wujinhui.xyz:81/vue/qunar/#/'
      },
      {
        title: '云客来订餐平台 webapp',
        imgUrl: '/img/2.jpg',
        description: '移动端：vue2 + 组件化 + axios + 短信验证码注册',
        projectUrl: 'http://www.wujinhui.xyz:81/vue/yunkelai_eleme'
      },
      {
        title: '启创思维教育官网',
        imgUrl: '/img/3.jpg',
        description: 'PC端：koa2 + jquery + mysql + sequelize',
        projectUrl: 'http://qcsw.wujinhui.xyz/'
      },
      {
        title: '商城购物车',
        imgUrl: '/img/4.jpg',
        description: '移动端：es6 + webpack工程化+ fastclick',
        projectUrl: 'http://www.wujinhui.xyz:81/es6/shopping_cart/index.html'
      },
      {
        title: '个人博客项目',
        imgUrl: '/img/6.jpg',
        description: '响应式：koa2 + jquery + less + 响应式适配',
        projectUrl: 'https://wujinhui.xyz'
      },
      {
        title: '启创思维管理后台 ',
        imgUrl: '/img/7.jpg',
        description: 'PC端：react + 跨域设置cookie + 路由跳转鉴权',
        projectUrl: 'https://gitee.com/wujinhui2019/qcsw_manager'
      },
    ],
    scripts: pageConf.indexPage.scripts
  });
});

module.exports = router;
